package com.douqu.game.activity;


import com.douqu.game.activity.server.SpringContext;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Author : Bean
 * 2017-07-06 15:36
 */
@EnableScheduling//定时任务
@SpringBootApplication
@EnableTransactionManagement//事务支持,要用事务控制的方法里必须抛出异常才会回滚
@MapperScan("com.douqu.game.activity.database.mapper")//扫描mapper
public class SpringServer {

    static String[] args = new String[]{};

    public static void start()
    {
        ApplicationContext applicationContext = SpringApplication.run(SpringServer.class, args);
        SpringContext.init(applicationContext);
    }

    public static void main(String[] args) {
        start();
    }








}
